package main

import (
	"photo_credit/models"
	_ "photo_credit/routers"

	beego "github.com/beego/beego/v2/server/web"
)

//GOPROXY=https://goproxy.cn,direct;GOPRIVATE=*.cds8.cn
func main() {

	beego.SetStaticPath("/assets/*", "assets")

	if beego.BConfig.RunMode == "dev" {
		beego.BConfig.WebConfig.DirectoryIndex = true
		beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
	}
	//数据库初始化
	models.Init()

	beego.Run()
}
